<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
    <title>免费注册ykQuant会员 -- 获得更多选股策略</title>
    <link rel="stylesheet" type="text/css" href="./easyui/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="./easyui/themes/icon.css">
    <link rel="stylesheet" type="text/css" href="./easyui/demo.css">
    <script type="text/javascript" src="./easyui/jquery.min.js"></script>
    <script type="text/javascript" src="./easyui/jquery.easyui.min.js"></script>

    <style type="text/css">
        .align-center {
            margin: 0 auto;
            /* 居中 这个是必须的，，其它的属性非必须 */
            width: 500px;
            /* 给个宽度 顶到浏览器的两边就看不出居中效果了 */
            background: transparent;
            /* 背景色 */
            text-align: left;
            /* 文字等内容居中 */
        }
    </style>
    <script src="com/md5.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {            
            $('#regForm').form({
                //url: 'http://host803049553.s205.pppf.com.cn/server/form_reg_proc.php',
                url: 'http://192.168.0.103/yquant/server/form_reg_proc.php',
                onSubmit: function () {
                    var tmp = hex_md5($("#pwd").val());
                    //$("#pwd").val(tmp);  
                    //$("#rpwd").val(tmp);  
                    $("#pwd").textbox("setValue", tmp);
                    $("#rpwd").textbox("setValue", tmp);
                    //$.messager.alert('提示', tmp, 'info');
                    return $(this).form();
                },
                success: function (data) {
                    //$.messager.alert('提示', data, 'info');
                    switch (data) {
                        case "10000":  
                            var t = $("#account").val();
                            //window.history.back(-1);
                            var curWwwPath = window.document.location.href;
                            var pathName = window.document.location.pathname;
                            var pos = curWwwPath.indexOf(pathName);
                            var localhostPaht = curWwwPath.substring(0, pos);
                            window.location.href = localhostPaht + "/yquant/vip.html?p="+t;
                            break;
                        case "10010":
                            $.messager.alert('提示', '账户格式错误', 'info');
                            break;
                        case "10011":
                            $.messager.alert('提示', '密码格式错误', 'info');
                            break;
                        case "10015":
                            $.messager.alert('提示', '这个账户太抢手，换个试试', 'info');
                            break;
                        case "10016":
                            $.messager.alert('提示', '注册频繁，稍后再试', 'info');
                            break;
                        default:
                            $.messager.alert('提示', data, 'info');
                            break;
                    } 
                }
            });
        });
    </script>

    <!--<script type="text/javascript">
        function formSubmit() {
            document.getElementById("ff").submit()
        }
    </script>-->
</head>

<body style="text-align:center">
    <h2>注册ykQuant会员</h2>
    <p>建议您认真填写邮箱或手机，这将是获得会员专享的唯一途径</p>
    <div style="margin:20px 0;"></div>
    <div class="align-center" title="注册会员" style="width:400px;padding:30px 60px;margin-left:auto;margin-right:auto;">
        <form id="regForm" method="post">
        <div style="margin-bottom:20px">
            <div>邮箱:</div>
            <input name="email" class="easyui-textbox" data-options="prompt:'建议填写...',validType:'email'" style="width:100%;height:32px">
        </div>
        <div style="margin-bottom:20px">
            <div>手机:</div>
            <input name="mobile" class="easyui-textbox" data-options="prompt:'建议填写...',validType:'mobile'" style="width:100%;height:32px">
        </div>
        <div style="margin-bottom:20px;font-size: 14">
            <div>账户:</div>
            <input name="account" class="easyui-textbox" data-options="required:true,prompt:'注册账户...',validType:'length[6,28]'" style="width:100%;height:32px">
        </div>
        <div style="margin-bottom:20px">
            <div>密码:</div>
            <input id="pwd" name="pwd" class="easyui-textbox" type="password" data-options="required:true,validType:'length[6,14]'" style="width:100%;height:32px">
        </div>
        <div style="margin-bottom:20px">
            <div>再次确认:</div>
            <input id="rpwd" name="rpwd" class="easyui-textbox" type="password" data-options="required:true" validType="equalTo['#pwd']" invalidMessage="两次输入密码不匹配" style="width:100%;height:32px">
        </div>

        <div>
            <!--<a href="#" class="easyui-linkbutton" iconCls="icon-ok" style="width:100%;height:32px">注册</a>-->
            <input type="submit" class="easyui-linkbutton" iconCls="icon-ok" style="width:100%;height:48px" value="注册">
        </div>
        </form>
    </div>
</body>

</html>